package com.hnhn.c69.boot.service.impl;

import com.hnhn.c69.boot.mapper.MedicalAssayMapper;
import com.hnhn.c69.boot.pojo.MedicalAssay;
import com.hnhn.c69.boot.service.MedicalAssayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class MedicalAssayServiceImpl implements MedicalAssayService {
    @Autowired
    MedicalAssayMapper medicalAssayMapper;
    @Override
    public List<MedicalAssay> findMed(Integer hospitalId) {
        return medicalAssayMapper.findMed(hospitalId);
    }

    @Override
    public int updateResult(Integer id, Integer assayResult) {
        return medicalAssayMapper.updateResult(id, assayResult);
    }

    @Override
    public int add(MedicalAssay medicalAssay) {
        return medicalAssayMapper.add(medicalAssay);
    }

}
